package com.dragoncombin.homework.Problem03;

// 手机卡
public class PhoneCard {

    // 特征：卡类型、卡号、用户名、密码、账户余额、通话时长（分钟）
    private PhoneCardEnum cardType;
    private String cardId;
    private String userName;
    private String password;
    private double balance;
    private int callDuration;
    private int mobileData;

    // 定义构造方法
    public PhoneCard() {
    }

    public PhoneCard(PhoneCardEnum cardType, String cardId, String userName, String password, double balance, int callDuration, int mobileData) {
        setCardType(cardType);
        setCardId(cardId);
        setUserName(userName);
        setPassword(password);
        setBalance(balance);
        setCallDuration(callDuration);
        setMobileData(mobileData);
    }

    public PhoneCardEnum getCardType() {
        return cardType;
    }

    public void setCardType(PhoneCardEnum cardType) {
        this.cardType = cardType;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getMobileData() {
        return mobileData;
    }

    public void setMobileData(int mobileData) {
        this.mobileData = mobileData;
    }

    // 行为： 显示（卡号+用户名+当前余额）
    public void show() {
        System.out.println("卡号: " + getCardId());
        System.out.println("用户名: " + getUserName());
        System.out.println("当前余额: " + getBalance());
    }
}
